package com.bjtu.literatureclient.dao.authorindex;

import com.bjtu.literatureclient.domain.authorindex.AuthorIndex;
import com.bjtu.literatureclient.domain.city.CityState;
import com.bjtu.literatureclient.domain.institution.CNInstitution;
import com.bjtu.literatureclient.domain.institution.ENInstitution;
import com.bjtu.literatureclient.domain.journal.JournalChinese;
import com.bjtu.literatureclient.domain.journal.JournalEnglish;
import com.bjtu.literatureclient.domain.publisher.CNPublisher;
import com.bjtu.literatureclient.domain.publisher.ENPublisher;
import com.bjtu.literatureclient.domain.user.UserIndexNoTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface AuthorIndexDao {
	Boolean addAuthorIndex(AuthorIndex authorIndex);
	Boolean addJournalTable2(JournalChinese journalChinese);
	Boolean checkISSN(String Issn);
	//Boolean addPublisherTable2(CNPublisher cnPublisher);
	int getCityID(@Param("Country") String Country, @Param("Province") String Province, @Param("City") String City);
	Boolean addPublisherTable2(CNPublisher cnPublisher);
	Boolean addCityState(CityState cityState);
	String getCity(String province_value);
	List <String> getStateName2(String Region);

	List<String> getCityName2(String StateName2);
	Boolean checkISSN1(String Issn);
	List <String> getStateName1(String Region);
	List<String> getCityName1(String StateName1);
	Boolean addPublisherTable1(ENPublisher enPublisher);
	int getCityID1(@Param("Country") String Country, @Param("Province") String Province, @Param("City") String City);
	Boolean addJournalTable1(JournalEnglish journalEnglish);
	String getChineseStateName2(String StateName1);
	boolean addUSerIndex(UserIndexNoTable userIndexNoTable);
	List<String> getPublisher();
	Boolean addInstitutionTable2(CNInstitution institution);
	Boolean addInstitutionTable1(ENInstitution institution);
	List<String> getPublisher1();
	int getInstitutionID(String InstitutionName2);
	String getEnglishStateName1(String StateName2);
	int getInstitutionID1(String institutionName);

	@Select("select * from  authorindexnotable  where IndexNo = #{indexNo} limit 1")
	AuthorIndex queryByIndexNo(@Param("indexNo") String indexNo);

}
